
class DesignersController < ApplicationController

  def index
    @promotions = DesignerPromotion.limit(2).order("created_at DESC")
    if mobile?
      @designers = User.get_designers(3)
    end
  end

  def new
    if current_user
      @user = current_user
    else
      @user = User.new
    end
  end

  def create

  end

  def edit
  end

  def update
  end

  def show
    @designer = User.find(params[:id])
    @design_cases = @designer.design_cases
  end

  def get_designers
    @user = User.get_designers(6)
    render json: @user, each_serializer: DesignerSerializer
  end
end
